<div class="main-container" id="main-container" xmlns:th="http://www.thymeleaf.org">
    <div class="main-container-inner">
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <form class="form-horizontal"  role="form" id="add_form" >
                        <input type="hidden" class="form-control" id="functionFCode" name="functionFCode" th:attr="value=${id}"/>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="myName" class="col-sm-3 control-label">上级权限</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control"
                                           readonly id="myName" name="myName" th:attr="value=${myName}"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentCode" class="col-sm-3 control-label">所属客户</label>
                                <div class="col-sm-7">
                                    <select class="form-control" id="rentCode" name="rentCode" >
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="functionName" class="col-sm-3 control-label">权限名称</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="functionName" name="functionName" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="functionUrl" class="col-sm-3 control-label">权限地址</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="functionUrl" name="functionUrl" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="functionType" class="col-sm-3 control-label">请求方式</label>
                                <div class="col-sm-7">
                                    <select class="form-control" id="functionType" name="functionType">
                                        <option value="1">POST</option>
                                        <option value="2">PUT</option>
                                        <option value="3">GET</option>
                                        <option value="4">DELETE</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        ajaxs('./DRent/getRentKeyValue', 'GET', null, true, function (typedata) {
            for (var i = 0; i < typedata.length; i++) {
                $("#rentCode").append("<option value=" + typedata[i].key + ">" + typedata[i].value + "</option>")
            }
        });
    });
    function form_sub() {
        ajaxs('./DFunction', 'POST',$("#add_form").serialize(), true, function(data){
            $("#im_unique_dlg").modal('hide');
            layer.msg(data.message);
            initTree();
        });
    }
</script>